<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flex布局性能测试</title>

    <style>
        #app {
            display: flex;
            flex-wrap: wrap;
        }
        .test {
            width: 100px;
            height: 100px;
            margin: 20px;
            background-color: blueviolet;
            /* float: left; */
        }
    </style>
</head>
<body>
    <button onclick="start()"> 开始布局 </button>
    <div id="app">

    </div>
    <script>
        function start() {
            var div = "<div class='test'></div>", dhtml = "";
            for (let i = 0; i < 10000; i++) {
                dhtml += div;
            }
            document.getElementById("app").innerHTML = dhtml;
        }
        
    </script>
</body>
</html>